package com.gc.server.vo.up;


import com.gc.server.dao.ShopDao;
import com.gc.server.dao.UserDao;
import com.gc.server.entity.ShopEntity;
import com.gc.server.entity.UserEntity;
import lombok.Data;

import java.util.Date;

import com.alibaba.excel.annotation.*;

import java.io.Serializable;


import com.gc.server.entity.UserShopEntity;
import com.gc.server.vo.UserShopVo;
import org.springframework.beans.factory.annotation.Autowired;


/**
 * 用户店铺管理关系集合实体
 * 表名 user_shop
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date ${datetime}
 */
@Data
public class UserShopUp implements Serializable {
    @ExcelIgnore
    private static final long serialVersionUID = 1L;

    //
    @ExcelProperty("")
    private Long id;

    //用户ID
    @ExcelProperty("用户ID")
    private Long userId;

    //用户ID
    @ExcelProperty("用户编号")
    private String code;

    //店铺ID
    @ExcelProperty("店铺ID")
    private Long shopId;

    //店铺ID
    @ExcelProperty("门店编号")
    private String shopCode;

    //备注
    @ExcelProperty("备注")
    private String remark;


    public UserShopUp() {

    }



    public UserShopVo toVo() {

        UserShopEntity entity = new UserShopEntity();
        UserShopVo vo = new UserShopVo(entity);
        entity.setId(id);
        entity.setUserId(userId);
        entity.setShopId(shopId);
        entity.setRemark(remark);
        ShopEntity shopEntity = new ShopEntity();
        shopEntity.setCode(shopCode);
        vo.setShop(shopEntity);
        UserEntity userEntity = new UserEntity();
        userEntity.setCode(code);
        vo.setUser(userEntity);
        return vo;
    }


}
